var chart1; // globally available
$(document).ready(function() {
      chart1 = new Highcharts.Chart({
	 chart: {
	    renderTo: 'chart-container-1',
	    defaultSeriesType: 'scatter'
	 },
	 title: {
	    text: document.getElementById("urlData").value
	 },
	 xAxis: {
	    title: {
	       enabled: true,
	       text: 'Temps en  Heure : Minute : Secondes '
	    },
	    labels: {
            formatter: function(){
	    		var date = new Date(this.value);
	    		return date.getHours()+':'+date.getMinutes()+':'+date.getSeconds();    		
            }
        }
	 },
	 yAxis: {
	    title: {
	       text: document.getElementById("urlUnit").value
	    }
	 },
	 series: [{
            name: 'Mesure',
            dataURL: '../../data/'+document.getElementById("urlData").value //'http://localhost:8080/data/'+document.getElementById("urlData").value
        	}]
      });
   });	
